<?php

/*
 * This page is for sign up using SalusMe account, if he already owns.
 */
# this part is for finding missing values in form. becase, if browser doesn't support html5 then this will be helpfull.
$er = false;
if($_POST['uname']==''){
    $er = true;
    echo '<br>Error : Username Missing ';    
}
if ($_POST['password']==''){
    $er = true;
    echo '<br>Error : Password Missing.';
}


include '../include/config.php';
$q1 = mysql_query("select * from fa_user where user_name ='" . $_POST['uname'] . "'");
while ($row = mysql_fetch_array($q1)) {
    if (md5($_POST['password']) != $row['password']) {
        $er = true;
        echo '<br>Error : Password Invalid';
        echo md5($_POST['password']).'<br>'.$row['password'];
    }
}
if($er==true){
    
    die ('<br><a href="../">Back</a>');
}
echo '<br>Success....';
echo '<br>Your Id : '.$row['id'];


?>
